import React from 'react'
import {
    View,
    Text,
    StyleSheet,
    TouchableWithoutFeedback
} from 'react-native'

export default class CommunityTitleCell extends React.PureComponent {

    render() {
        return (
            <TouchableWithoutFeedback onPress={this.clickCellAction}>
                <View style={styles.container}>
                    <Text numberOfLines={1} style={styles.title}>{this.props.data.title}</Text>
                </View>
            </TouchableWithoutFeedback>
        )
    }

    clickCellAction = () => {
        this.props.clickCellAction(this.props.data)
    }
}

const styles = StyleSheet.create({
    container: {
        justifyContent: 'center',
        marginLeft: 10,
        marginRight: 10,
        marginTop:5,
        marginBottom:5,
    },
    title: {
        fontWeight: 'bold',
        fontSize: 15,
    }
})